<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>商品列表</title>
    <link rel="stylesheet" href="/css/bootstrap.min.css" type="text/css"/>
    <script src="/js/jquery-1.11.3.min.js" type="text/javascript"></script>
    <script src="/js/bootstrap.min.js" type="text/javascript"></script>

    <link rel="stylesheet" href="/css/common.css"/>
</head>
<body>
<#--data: ${list!'null'}-->
<#if debug??>
    <table border="1px" width="500px">
        <tr>
            <th>id</th>
            <th>title</th>
            <th>price</th>
            <th>pic_thumbnail</th>
            <th>pic</th>
            <th>store_name</th>
            <th>sub_title</th>
            <th>total_comment</th>
        </tr>
        <#list goodsList as goods>
            <tr>
                <td>${goods.id}</td>
                <td>${goods.title}</td>
                <td>${goods.price}</td>
                <td>${goods.pic_thumbnail}</td>
                <td>${goods.pic}</td>
                <td>${goods.store_name}</td>
                <td>${goods.sub_title}</td>
                <td>${goods.total_comment}</td>
            </tr>
        </#list>
    </table>
</#if>

<div id="header">
    <!-- 头部 start -->
    <div class="top_banner">
        <img width="100%" src="/img/top_banner.jpg" alt="">
    </div>
    <div class="shortcut">
        <div class="home_page">
            <a href="/goods/list">首页</a>
        </div>
        <!-- 未登录状态  -->
        <div class="login_out">
            <span id="welcome">欢迎您！<span id="user_name">${(user.username)!'未知'}</span></span>
            <a href="/user/logout">退出</a>
            <a href="/login.html">登录</a>
            <a href="/register.html">注册</a>
        </div>
    </div>
</div>

<div class="container">
    <div class="row">
        <#list goodsList as goods>
            <a href="/goods/detail?id=${goods.id}">
                <div class="col-md-4">
                    <div class="thumbnail">
                        <img style="width: 220px; height: 230px" src="/img/${goods.pic_thumbnail}">
                        <div class="caption">
                            <h3 class="price">&yen;${goods.realPrice}</h3>
                            <p class="title">${goods.title}</p>
                            <p><span class="total_comment">${goods.total_comment}</span><span
                                        class="comment_tip">条评价</span></p>
                            <p class="comment_tip">${goods.store_name} <span
                                        class="glyphicon glyphicon-phone-alt contact"></span></p>
                        </div>
                    </div>
                </div>
            </a>
        </#list>
    </div>
</div>
<br/>
</body>
</html>